/**
 * 
 */
package good_src.Client;

import good_src.Interfaces.Afficheur;

/**
 * @author Tangi Midy & Fabien Le Peih
 *
 */
public class ClientFacade implements Runnable{

//	private SwtFacade swtFacade=null;
	private SwingFacadeGlobal swingFacade=null;
	private int type;
	private Afficheur afficheur;
	
	/**
	 * Constructor of the class
	 */
	public ClientFacade(int type) {
		this.type=type;
	}
	
//	public void initFacadeSWT(){
//		swtFacade = new SwtFacade(afficheur);
//	}
	
	public void initFacadeSwing(){
		//swingFacade = SwingFacadeGlobal.getInstance();
	}

	public void updateCompteur(String text) {
//		Thread tmp;
//		if (swingFacade!=null){
//			swingFacade.updateCompteur(text);
//		}		
//		else{
//			tmp = new Thread(swtFacade);	
//			tmp.start();
//		}
	}

	@Override
	public void run() {
		switch (type) {
//		case 1:swtFacade = new SwtFacade(afficheur);
//			
//			break;
		case 2:swingFacade = SwingFacadeGlobal.getInstance();
			break;

		default:System.err.println("Mauvaise configuration");
				System.exit(0);		
			break;
		}
		
	}
	

}
